<template>
  <header>
    <i class="iconfont icon-zuojiantou" @click="goBack"></i>
    <slot>
      <span>登录</span>
    </slot>
    <i class="iconfont icon-home" @click="goHome"></i>
  </header>
</template>

<script>
export default {
  methods:{
    goBack(){
      this.$router.back()
    },
    goHome(){
      this.$router.push({
        name:'Home'
      })
    }
  }
};
</script>

<style scoped>
header {
  height: 40px;
  background-color: rgba(210, 0, 0, 1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #eee;
}
header i {
  height: 100%;
  width: 40px;
  line-height: 40px;
  text-align: center;
  font-size: 20px;
}
header span {
  font-size: 18px;
}
</style>